let Mock = require('mockjs');
module.exports = {
    url: '/login',
    method: ['POST'],
    res: (req) => {
        let username = req.body.username;
        return Mock.mock({
            "code": 0,
            "data": {
                username: username,
                role: username === 'admin' ? 'admin' : 'user',
                access_token: 'e10adc3949ba59abbe56e057f20f883e'
            },
            "msg": "success"
        })
    }
}